package com.hbk.param;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

public class MemberParam {

    @Data
    public static class LoginParam{
        @NotNull(message = "用户名不能为空")
        @Size(min = 4, max = 12, message = "用户名长度为4-12个字符")
        private String username;
        @NotNull(message = "密码不能为空")
        @Size(min = 6, max = 12, message = "密码长度为4-12个字符")
        private String password;
    }

    @Data
    public static class ChangePassParam {
        @NotNull
        private String username;
        @NotNull
        @Size(min = 4, max = 12, message = "密码长度为4-12个字符")
        private String oldPass;
        @NotNull
        @Size(min = 6, max = 12, message = "密码长度为4-12个字符")
        private String newPass;
    }

    @Data
    public static class ListParam {
        @NotNull
        private Integer start;
        @NotNull
        private Integer num;
    }

    @Data
    public static class DisableParam {
        @NotNull
        private String userId;
    }

    @Data
    public static class UsableParam{
        @NotNull
        private String userId;
    }

    @Data
    public static class ResetPassParam {
        @NotNull
        private String userId;
    }

    @Data
    public static class AddParam {
        @NotNull(message = "用户名不能为空")
        @Size(min = 4, max = 12, message = "用户名长度为4-12个字符")
        private String username;
        @NotNull
        @Size(min = 6, max = 12, message = "密码长度为4-12个字符")
        private String password;
        @NotNull
        private String realName;
        @NotNull
        private Integer usable;
    }

    @Data
    public static class ModifyParam{
        @NotNull
        private String userId;
        @NotNull
        private String realName;
        @NotNull
        private Integer usable;
    }

    @Data
    public static class DeleteParam{
        @NotNull
        private String userId;
    }
}
